<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>表格操作 | Luckysheet文档</title>
    <meta name="generator" content="VuePress 1.8.0">
    
    <meta name="description" content="Luckysheet ，一款纯前端类似excel的在线表格，功能强大、配置简单、完全开源。本站包含官方配置文档,API,教程。">
    <meta property="article:modified_time" content="2021-01-19T01:33:53.000Z">
    <meta property="og:title" content="表格操作">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://mengshukeji.github.io/LuckysheetDemo/zh/guide/operate.html">
    <meta name="twitter:title" content="表格操作">
    <meta name="twitter:url" content="https://mengshukeji.github.io/LuckysheetDemo/zh/guide/operate.html">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:label1" content="Written by">
    
    <link rel="preload" href="/LuckysheetDocs/assets/css/0.styles.58462003.css" as="style"><link rel="preload" href="/LuckysheetDocs/assets/js/app.02d9598d.js" as="script"><link rel="preload" href="/LuckysheetDocs/assets/js/2.daa13025.js" as="script"><link rel="preload" href="/LuckysheetDocs/assets/js/31.d87cf3af.js" as="script"><link rel="prefetch" href="/LuckysheetDocs/assets/js/10.866635ea.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/11.825eabba.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/12.980dcb91.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/13.119fa3a0.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/14.61ea2478.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/15.51a43d85.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/16.de626d16.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/17.e9ae302c.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/18.46d5e5a0.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/19.6ab6bd88.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/20.a4dd0048.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/21.cf5034d8.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/22.c45a4387.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/23.e08fd533.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/24.d1e4369b.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/25.291afc50.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/26.e74f90a6.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/27.1142ecb7.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/28.d6d28da0.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/29.1ae5f953.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/3.c428902d.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/30.bf70d4f4.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/32.a1b6f5f4.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/33.eded6080.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/4.b5e0f872.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/5.e526f9d4.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/6.8106d72b.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/7.c0fe87fd.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/8.abc5c19b.js"><link rel="prefetch" href="/LuckysheetDocs/assets/js/9.2bf3882a.js">
    <link rel="stylesheet" href="/LuckysheetDocs/assets/css/0.styles.58462003.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/LuckysheetDocs/zh/" class="home-link router-link-active"><img src="/LuckysheetDocs/img/logo.png" alt="Luckysheet文档" class="logo"> <span class="site-name can-hide">Luckysheet文档</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/LuckysheetDocs/zh/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/LuckysheetDocs/zh/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="https://mengshukeji.github.io/LuckysheetDemo/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  演示
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="了解更多" class="dropdown-title"><span class="title">了解更多</span> <span class="arrow down"></span></button> <button type="button" aria-label="了解更多" class="mobile-dropdown-title"><span class="title">了解更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/LuckysheetDocs/zh/about/" class="nav-link">
  关于
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="选择语言" class="dropdown-title"><span class="title">选择语言</span> <span class="arrow down"></span></button> <button type="button" aria-label="选择语言" class="mobile-dropdown-title"><span class="title">选择语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/LuckysheetDocs/guide/operate.html" class="nav-link">
  English
</a></li><li class="dropdown-item"><!----> <a href="/LuckysheetDocs/zh/guide/operate.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  简体中文
</a></li></ul></div></div> <a href="https://github.com/mengshukeji/Luckysheet" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/LuckysheetDocs/zh/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/LuckysheetDocs/zh/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="https://mengshukeji.github.io/LuckysheetDemo/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  演示
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="了解更多" class="dropdown-title"><span class="title">了解更多</span> <span class="arrow down"></span></button> <button type="button" aria-label="了解更多" class="mobile-dropdown-title"><span class="title">了解更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/LuckysheetDocs/zh/about/" class="nav-link">
  关于
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="选择语言" class="dropdown-title"><span class="title">选择语言</span> <span class="arrow down"></span></button> <button type="button" aria-label="选择语言" class="mobile-dropdown-title"><span class="title">选择语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/LuckysheetDocs/guide/operate.html" class="nav-link">
  English
</a></li><li class="dropdown-item"><!----> <a href="/LuckysheetDocs/zh/guide/operate.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  简体中文
</a></li></ul></div></div> <a href="https://github.com/mengshukeji/Luckysheet" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><a href="/LuckysheetDocs/zh/guide/" aria-current="page" class="sidebar-link">快速上手</a></li><li><a href="/LuckysheetDocs/zh/guide/config.html" class="sidebar-link">整体配置</a></li><li><a href="/LuckysheetDocs/zh/guide/sheet.html" class="sidebar-link">工作表配置</a></li><li><a href="/LuckysheetDocs/zh/guide/cell.html" class="sidebar-link">单元格</a></li><li><a href="/LuckysheetDocs/zh/guide/operate.html" aria-current="page" class="active sidebar-link">表格操作</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#单元格刷新" class="sidebar-link">单元格刷新</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#config操作" class="sidebar-link">config操作</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#通用保存" class="sidebar-link">通用保存</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#函数链操作" class="sidebar-link">函数链操作</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#行列操作" class="sidebar-link">行列操作</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#筛选操作" class="sidebar-link">筛选操作</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#sheet操作" class="sidebar-link">sheet操作</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#sheet属性-隐藏或显示" class="sidebar-link">sheet属性(隐藏或显示)</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#表格信息更改" class="sidebar-link">表格信息更改</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#图表-todo" class="sidebar-link">图表(TODO)</a></li><li class="sidebar-sub-header"><a href="/LuckysheetDocs/zh/guide/operate.html#后端返回格式" class="sidebar-link">后端返回格式</a></li></ul></li><li><a href="/LuckysheetDocs/zh/guide/api.html" class="sidebar-link">API</a></li><li><a href="/LuckysheetDocs/zh/guide/resource.html" class="sidebar-link">教程与资源</a></li><li><a href="/LuckysheetDocs/zh/guide/FAQ.html" class="sidebar-link">常见问题</a></li><li><a href="/LuckysheetDocs/zh/guide/contribute.html" class="sidebar-link">贡献指南</a></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="表格操作"><a href="#表格操作" class="header-anchor">#</a> 表格操作</h1> <p>每一次操作都会保存历史记录，用于撤销和重做，如果在表格初始化的时候开启了<a href="/LuckysheetDocs/zh/guide/config.html#updateurl">共享编辑</a>功能，则会通过websocket将操作实时更新到后台。</p> <blockquote><p>源码 <a href="https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/server.js" target="_blank" rel="noopener noreferrer"><code>src/controllers/server.js</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> 模块实现了后台保存功能</p></blockquote> <p>通常，共享编辑（或者叫协同编辑）是需要和账户系统配合来控制权限的，开发者可以根据已有功能，配合自己的账户管理功能自行实现权限控制。</p> <p>以下为所有的支持传输到后台的操作类型，并且以MongoDB做存储示例，讲解如何做前后端交互。</p> <p>注意一点，对象中的i为当前sheet的index值，而不是order。</p> <h2 id="单元格刷新"><a href="#单元格刷新" class="header-anchor">#</a> 单元格刷新</h2> <h3 id="单个单元格刷新"><a href="#单个单元格刷新" class="header-anchor">#</a> 单个单元格刷新</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;v&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_0554kKiKl4M7_1597974810804&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token number">233</span><span class="token punctuation">,</span>
        <span class="token property">&quot;ct&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;fa&quot;</span><span class="token operator">:</span> <span class="token string">&quot;General&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;n&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">&quot;m&quot;</span><span class="token operator">:</span> <span class="token string">&quot;233&quot;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;r&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;c&quot;</span><span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>v</td> <td>单元格的值，数字、字符串或着对象格式，对象参考 <a href="/LuckysheetDocs/zh/guide/cell.html#基本单元格">单元格属性表</a></td></tr> <tr><td>r</td> <td>单元格的行号</td></tr> <tr><td>c</td> <td>单元格的列号</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>前端维护luckysheetfile[i].data，而单元格更新到后台，继续维护<code>luckysheetfile[i].celldata</code> 参数，celldata是一个一维数组：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">[</span>
    <span class="token punctuation">{</span>r<span class="token operator">:</span><span class="token number">0</span><span class="token punctuation">,</span> c<span class="token operator">:</span><span class="token number">1</span><span class="token punctuation">,</span> v<span class="token operator">:</span> <span class="token string">&quot;值1&quot;</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">{</span>r<span class="token operator">:</span><span class="token number">10</span><span class="token punctuation">,</span> c<span class="token operator">:</span><span class="token number">11</span><span class="token punctuation">,</span> v<span class="token operator">:</span><span class="token string">&quot;值2&quot;</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">{</span>r<span class="token operator">:</span><span class="token number">10</span><span class="token punctuation">,</span> c<span class="token operator">:</span><span class="token number">11</span><span class="token punctuation">,</span> v<span class="token operator">:</span><span class="token punctuation">{</span>f<span class="token operator">:</span><span class="token string">&quot;=sum&quot;</span><span class="token punctuation">,</span> v<span class="token operator">:</span><span class="token string">&quot;100&quot;</span><span class="token punctuation">}</span><span class="token punctuation">}</span>
<span class="token punctuation">]</span>
</code></pre></div><p>后台在保存前台推送的数据时，会更新 <code>luckysheetfile[i].celldata</code> 字段，如果存在该单元格则更新，如果没有则添加，如果存在该单元格但是<code>v</code>为null则删除该单元格。</p></li></ul> <h3 id="范围单元格刷新"><a href="#范围单元格刷新" class="header-anchor">#</a> 范围单元格刷新</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;rv&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_ahKdzaNC65iL_1598343160744&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">[</span>
            <span class="token punctuation">{</span> <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token property">&quot;ct&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;fa&quot;</span><span class="token operator">:</span> <span class="token string">&quot;General&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;n&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">&quot;m&quot;</span><span class="token operator">:</span> <span class="token string">&quot;3&quot;</span> <span class="token punctuation">}</span>
        <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token punctuation">[</span>
            <span class="token punctuation">{</span> <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token property">&quot;ct&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;fa&quot;</span><span class="token operator">:</span> <span class="token string">&quot;General&quot;</span><span class="token punctuation">,</span> <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;n&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token property">&quot;m&quot;</span><span class="token operator">:</span> <span class="token string">&quot;4&quot;</span> <span class="token punctuation">}</span>
        <span class="token punctuation">]</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span> <span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的索引值</td></tr> <tr><td>v</td> <td>范围二维数组，单元格对象参考 <a href="/LuckysheetDocs/zh/guide/cell.html#基本单元格">单元格属性表</a></td></tr> <tr><td>range</td> <td>范围行列数</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>前端维护luckysheetfile[i].data，而单元格更新到后台，继续维护<code>luckysheetfile[i].celldata</code> 参数，需要将指定位置<code>range</code>的所有单元格数据替换为新的数据</p></li></ul> <h2 id="config操作"><a href="#config操作" class="header-anchor">#</a> config操作</h2> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code>  <span class="token punctuation">{</span>
      <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;cg&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_0554kKiKl4M7_1597974810804&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span>
              <span class="token property">&quot;rangeType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;range&quot;</span><span class="token punctuation">,</span>
              <span class="token property">&quot;borderType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;border-all&quot;</span><span class="token punctuation">,</span>
              <span class="token property">&quot;color&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
              <span class="token property">&quot;style&quot;</span><span class="token operator">:</span> <span class="token string">&quot;1&quot;</span><span class="token punctuation">,</span>
              <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span><span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">1</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span>
          <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
      <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;borderInfo&quot;</span>
  <span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>v</td> <td>需要更新value值</td></tr> <tr><td>k</td> <td>操作的key值，可选 边框：<code>'borderInfo'</code> / ：行隐藏：<code>'rowhidden'</code> / 列隐藏：<code>'colhidden'</code> / 行高：<code>'rowlen'</code> / 列宽：<code>'columnlen'</code></td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新 <code>luckysheetfile[i].config[k] = v</code> ，如果<code>config</code>中不存在<code>k</code>，则新建一个<code>k</code>属性并设置为空。</p> <p>注意一点，修改config中的某个配置时，会把这个配置全部传输到后台，比如修改borderInfo，本来已经有一个含边框的单元格了，再新设置一个单元格边框，这时候会把这两个单元格边框信息都传输到后台，而不做更细颗粒的操作。</p> <ol><li><p>行隐藏：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;cg&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_0554kKiKl4M7_1597974810804&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;5&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token property">&quot;6&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token property">&quot;13&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token property">&quot;14&quot;</span><span class="token operator">:</span> <span class="token number">0</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token comment">// 包含所有隐藏行信息</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;rowhidden&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<code>luckysheetfile[&quot;Sheet_0554kKiKl4M7_1597974810804&quot;].config[&quot;rowhidden&quot;] = { &quot;5&quot;: 0, &quot;6&quot;: 0, &quot;13&quot;: 0, &quot;14&quot;: 0 }</code></li></ul></li> <li><p>修改行高：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;cg&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_0554kKiKl4M7_1597974810804&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;9&quot;</span><span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span> <span class="token property">&quot;11&quot;</span><span class="token operator">:</span> <span class="token number">71</span><span class="token punctuation">,</span> <span class="token property">&quot;15&quot;</span><span class="token operator">:</span> <span class="token number">58</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token comment">// 包含所有修改过高度的单元格信息</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;rowlen&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<code>luckysheetfile[&quot;Sheet_0554kKiKl4M7_1597974810804&quot;].config[&quot;rowlen&quot;] = { &quot;9&quot;: 20, &quot;11&quot;: 71, &quot;15&quot;: 58 }</code></li></ul></li> <li><p>修改列宽：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;cg&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_0554kKiKl4M7_1597974810804&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;2&quot;</span><span class="token operator">:</span> <span class="token number">135</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;columnlen&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<code>luckysheetfile[&quot;Sheet_0554kKiKl4M7_1597974810804&quot;].config[&quot;columnlen&quot;] = { &quot;2&quot;: 135 }</code></li></ul></li></ol></li></ul> <h2 id="通用保存"><a href="#通用保存" class="header-anchor">#</a> 通用保存</h2> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code>  <span class="token punctuation">{</span>
      <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
      <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
          <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;rangeRow&quot;</span><span class="token punctuation">,</span>
          <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;row_focus&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token property">&quot;column_focus&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;frozen&quot;</span>
  <span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>v</td> <td>需要更新value值</td></tr> <tr><td>k</td> <td>操作的key值</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新 <code>luckysheetfile[i][k] = v</code> ，如果<code>luckysheetfile[i]</code>中不存在<code>k</code>，则新建一个<code>k</code>属性并设置为空。</p> <ol><li><p>冻结行列：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;rangeRow&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;row_focus&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token property">&quot;column_focus&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;frozen&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;frozen&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;rangeRow&quot;</span><span class="token punctuation">,</span>
        <span class="token string">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token string">&quot;row_focus&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token string">&quot;column_focus&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
</code></pre></div></li></ul></li> <li><p>修改工作表名称：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Cell22&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;name&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<code>luckysheetfile[0][&quot;name&quot;] = &quot;Cell22&quot;</code></li></ul></li> <li><p>修改工作表颜色：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#f02323&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;color&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<code>luckysheetfile[0][&quot;color&quot;] = &quot;#f02323&quot;</code></li></ul></li> <li><p>合并单元格：</p> <ul><li><p>发送到后台：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_aheLt0Waf1lk_1598248231626&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;merge&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">&quot;0_0&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;r&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>  <span class="token property">&quot;c&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token property">&quot;rs&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token property">&quot;cs&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">&quot;rowlen&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;config&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p>后台更新：</p> <div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token string">&quot;Sheet_aheLt0Waf1lk_1598248231626&quot;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;config&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span>  <span class="token punctuation">{</span>
    <span class="token string">&quot;merge&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;0_0&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token string">&quot;r&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>  <span class="token string">&quot;c&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token string">&quot;rs&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token string">&quot;cs&quot;</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token string">&quot;rowlen&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div><p>注意，合并单元格的更新比较特殊，要求把整个config传输到后台，因为合并单元格可能会影响到其他参数。</p></li></ul></li> <li><p>筛选范围：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">16</span><span class="token punctuation">,</span> <span class="token number">21</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span> <span class="token punctuation">]</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;filter_select&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;filter_select&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span>  <span class="token punctuation">{</span>
        <span class="token string">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">16</span><span class="token punctuation">,</span> <span class="token number">21</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token string">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span> <span class="token punctuation">]</span>
    <span class="token punctuation">}</span>
</code></pre></div></li></ul></li> <li><p>筛选的具体设置：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;0&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">&quot;caljs&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token string">&quot;textinclude&quot;</span><span class="token punctuation">,</span>
                <span class="token property">&quot;text&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Text contains&quot;</span><span class="token punctuation">,</span>
                <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;1&quot;</span><span class="token punctuation">,</span>
                <span class="token property">&quot;value1&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Lucky&quot;</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rowhidden&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;18&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;optionstate&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
            <span class="token property">&quot;str&quot;</span><span class="token operator">:</span> <span class="token number">17</span><span class="token punctuation">,</span>
            <span class="token property">&quot;edr&quot;</span><span class="token operator">:</span> <span class="token number">19</span><span class="token punctuation">,</span>
            <span class="token property">&quot;cindex&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
            <span class="token property">&quot;stc&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
            <span class="token property">&quot;edc&quot;</span><span class="token operator">:</span> <span class="token number">3</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;filter&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;filter&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;0&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token string">&quot;caljs&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token string">&quot;value&quot;</span><span class="token operator">:</span> <span class="token string">&quot;textinclude&quot;</span><span class="token punctuation">,</span>
                <span class="token string">&quot;text&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Text contains&quot;</span><span class="token punctuation">,</span>
                <span class="token string">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;1&quot;</span><span class="token punctuation">,</span>
                <span class="token string">&quot;value1&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Lucky&quot;</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token string">&quot;rowhidden&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token string">&quot;18&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token string">&quot;optionstate&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
            <span class="token string">&quot;str&quot;</span><span class="token operator">:</span> <span class="token number">17</span><span class="token punctuation">,</span>
            <span class="token string">&quot;edr&quot;</span><span class="token operator">:</span> <span class="token number">19</span><span class="token punctuation">,</span>
            <span class="token string">&quot;cindex&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
            <span class="token string">&quot;stc&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
            <span class="token string">&quot;edc&quot;</span><span class="token operator">:</span> <span class="token number">3</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
</code></pre></div></li></ul></li> <li><p>交替颜色：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_4N45tpMd0ni4_1598250591760&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token property">&quot;cellrange&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">6</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span> <span class="token punctuation">]</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;format&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;head&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#f6cb4b&quot;</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token property">&quot;one&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#ffffff&quot;</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token property">&quot;two&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#fff9e7&quot;</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token property">&quot;foot&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#ffebac&quot;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;hasRowHeader&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
            <span class="token property">&quot;hasRowFooter&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;luckysheet_alternateformat_save&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token string">&quot;Sheet_4N45tpMd0ni4_1598250591760&quot;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;luckysheet_alternateformat_save&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span>   <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token string">&quot;cellrange&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token string">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">6</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token string">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">4</span> <span class="token punctuation">]</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token string">&quot;format&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token string">&quot;head&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token string">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token string">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#f6cb4b&quot;</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token string">&quot;one&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token string">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token string">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#ffffff&quot;</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token string">&quot;two&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token string">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token string">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#fff9e7&quot;</span>
                <span class="token punctuation">}</span><span class="token punctuation">,</span>
                <span class="token string">&quot;foot&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token string">&quot;fc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#000&quot;</span><span class="token punctuation">,</span>
                    <span class="token string">&quot;bc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#ffebac&quot;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token string">&quot;hasRowHeader&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
            <span class="token string">&quot;hasRowFooter&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span>
</code></pre></div></li></ul></li> <li><p>条件格式：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_545W7w03kLkC_1598251927583&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;default&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;cellrange&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">{</span>
                    <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">6</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span> <span class="token punctuation">]</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">&quot;format&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;textColor&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#9c0006&quot;</span><span class="token punctuation">,</span>
                <span class="token property">&quot;cellColor&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#ffc7ce&quot;</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;conditionName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;greaterThan&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;conditionRange&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">&quot;conditionValue&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;3&quot;</span> <span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;luckysheet_conditionformat_save&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token string">&quot;Sheet_545W7w03kLkC_1598251927583&quot;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;luckysheet_conditionformat_save&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span>   <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token string">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;default&quot;</span><span class="token punctuation">,</span>
            <span class="token string">&quot;cellrange&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">{</span>
                    <span class="token string">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">6</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                    <span class="token string">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">3</span> <span class="token punctuation">]</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string">&quot;format&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token string">&quot;textColor&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#9c0006&quot;</span><span class="token punctuation">,</span>
                <span class="token string">&quot;cellColor&quot;</span><span class="token operator">:</span> <span class="token string">&quot;#ffc7ce&quot;</span>
            <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token string">&quot;conditionName&quot;</span><span class="token operator">:</span> <span class="token string">&quot;greaterThan&quot;</span><span class="token punctuation">,</span>
            <span class="token string">&quot;conditionRange&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string">&quot;conditionValue&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">&quot;3&quot;</span> <span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span>
</code></pre></div></li></ul></li> <li><p>数据透视表：</p> <ul><li><p>发送到后台：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_r3Cz5bbxipL3_1598252547290&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;pivot_select_save&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span> <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">&quot;pivotDataSheetIndex&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_31ikLMip330K_1598252536645&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">&quot;filter&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">&quot;values&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token property">&quot;showType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;column&quot;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;pivotTable&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p>后台更新：</p> <div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token string">&quot;Sheet_r3Cz5bbxipL3_1598252547290&quot;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;pivotTable&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span>  <span class="token punctuation">{</span>
        <span class="token string">&quot;pivot_select_save&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token string">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token string">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">2</span> <span class="token punctuation">]</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token string">&quot;pivotDataSheetIndex&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_31ikLMip330K_1598252536645&quot;</span><span class="token punctuation">,</span>
        <span class="token string">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token string">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token string">&quot;filter&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token string">&quot;values&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
        <span class="token string">&quot;showType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;column&quot;</span>
    <span class="token punctuation">}</span>
</code></pre></div><p>注意，虽然数据透视表的格式是这个，但是当你选择一个范围之后，点击生产数据透视表时，Luckysheet会先执行新建sheet页和切换到该sheet页的操作，才能在新建的sheet页加上数据透视表。</p></li></ul></li> <li><p>动态数组：</p> <ul><li>发送到后台：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;all&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_r3Cz5bbxipL3_1598252547290&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token property">&quot;r&quot;</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
            <span class="token property">&quot;c&quot;</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
            <span class="token property">&quot;f&quot;</span><span class="token operator">:</span> <span class="token string">&quot;=UNIQUE(B2:E9)&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;data&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span><span class="token punctuation">,</span> <span class="token number">10</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">11</span> <span class="token punctuation">]</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token property">&quot;k&quot;</span><span class="token operator">:</span> <span class="token string">&quot;dynamicArray&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li>后台更新：<div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token string">&quot;Sheet_r3Cz5bbxipL3_1598252547290&quot;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&quot;dynamicArray&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span>   <span class="token punctuation">[</span>
        <span class="token punctuation">{</span>
            <span class="token string">&quot;r&quot;</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
            <span class="token string">&quot;c&quot;</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
            <span class="token string">&quot;f&quot;</span><span class="token operator">:</span> <span class="token string">&quot;=UNIQUE(B2:E9)&quot;</span><span class="token punctuation">,</span>
            <span class="token string">&quot;data&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span><span class="token punctuation">,</span> <span class="token number">10</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
                <span class="token punctuation">[</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">9</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">11</span> <span class="token punctuation">]</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">]</span>
</code></pre></div></li></ul></li></ol></li></ul> <h2 id="函数链操作"><a href="#函数链操作" class="header-anchor">#</a> 函数链操作</h2> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code>
<span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;fc&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;r\&quot;:1,\&quot;c\&quot;:1,\&quot;index\&quot;:\&quot;0\&quot;,\&quot;func\&quot;:[true,3,\&quot;=sum(A1:B1)\&quot;]}&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;op&quot;</span><span class="token operator">:</span> <span class="token string">&quot;add&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;pos&quot;</span><span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>

</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>v</td> <td>对象值，这里对象的内部字段不需要单独更新，所以存为文本即可</td></tr> <tr><td>op</td> <td>操作类型,<code>add</code>为新增，<code>update</code>为更新，<code>del</code>为删除</td></tr> <tr><td>pos</td> <td>更新或者删除的函数位置</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>calcChain为一个数组</p> <ul><li>如果<code>op</code>的值为<code>add</code>则添加到末尾 <code>luckysheetfile[0].calcChain.push(v)</code>，</li> <li>如果<code>op</code>的值为<code>update</code>，格式为：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;fc&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{\&quot;r\&quot;:0,\&quot;c\&quot;:3,\&quot;index\&quot;:\&quot;0\&quot;,\&quot;func\&quot;:[true,1,\&quot;=Formula!A1+Formula!B1+1\&quot;],\&quot;color\&quot;:\&quot;w\&quot;,\&quot;parent\&quot;:null,\&quot;chidren\&quot;:{},\&quot;times\&quot;:0}&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span> <span class="token string">&quot;update&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;pos&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
<span class="token punctuation">}</span>
</code></pre></div>更新 <code>luckysheetfile[0].calcChain[pos] = v</code>，</li> <li>如果<code>op</code>的值为<code>del</code>则删除，格式为：<div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;fc&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span> <span class="token string">&quot;del&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;pos&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
<span class="token punctuation">}</span>
</code></pre></div><code>luckysheetfile[0].calcChain.splice(pos, 1)</code>。</li></ul></li></ul> <h2 id="行列操作"><a href="#行列操作" class="header-anchor">#</a> 行列操作</h2> <h3 id="删除行或列"><a href="#删除行或列" class="header-anchor">#</a> 删除行或列</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;drc&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;index&quot;</span><span class="token operator">:</span> <span class="token number">6</span><span class="token punctuation">,</span>
      <span class="token property">&quot;len&quot;</span><span class="token operator">:</span> <span class="token number">2</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token property">&quot;rc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;r&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><tr><td colspan="2">参数</td> <td>说明</td></tr> <tr><td colspan="2">t</td> <td>操作类型表示符号</td></tr> <tr><td colspan="2">i</td> <td>当前sheet的index值</td></tr> <tr><td colspan="2">rc</td> <td>行操作还是列操作，值`r`代表行，`c`代表列</td></tr> <tr><td rowspan="2">v</td> <td>index</td> <td>从第几行或者列开始删除</td></tr> <tr><td>len</td> <td>删除多少行或者列</td></tr></table></li> <li><p><strong>后台更新</strong>：</p> <p>如果<code>rc</code>的值是<code>'r'</code>删除行， 如果<code>rc</code>的值为<code>'c'</code>则删除列， 例如<code>rc='r'</code>，<code>index=4</code>，<code>len=5</code>，则代表从第4行开始删除之后的5行（4、5、6、7、8）。</p> <p>主要是对 <code>luckysheetfile[i].celldata</code> 中的单元格进行操作，删除参数中所描述符合条件的单元格并且更新其他单元格的行列值，以上述为例，首先查找单元格中<code>r</code>值在4到8的所有单元格并删除，然后把本来行号9以后的单元格的<code>r</code>值减去5，最后把 <code>luckysheetfile[i].row</code> 减去5。
如果<code>v</code>值为 <code>&quot;#__qkdelete#&quot;</code>（不含引号），则此处为需要删除的单元格。</p></li></ul> <h3 id="增加行或列"><a href="#增加行或列" class="header-anchor">#</a> 增加行或列</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;arc&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;index&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
      <span class="token property">&quot;len&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
      <span class="token property">&quot;direction&quot;</span><span class="token operator">:</span> <span class="token string">&quot;lefttop&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;data&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token property">&quot;rc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;r&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><tr><td colspan="2">参数</td> <td>说明</td></tr> <tr><td colspan="2">t</td> <td>操作类型表示符号</td></tr> <tr><td colspan="2">i</td> <td>当前sheet的index值</td></tr> <tr><td colspan="2">rc</td> <td>行操作还是列操作，值`r`代表行，`c`代表列</td></tr> <tr><td rowspan="4">v</td> <td>index</td> <td>从第几行或者列开始新增</td></tr> <tr><td>len</td> <td>增加多少行或者列</td></tr> <tr><td>direction</td> <td>方向</td></tr> <tr><td>data</td> <td>新增行或者列的内容</td></tr></table></li> <li><p><strong>后台更新</strong>：</p> <p>如果<code>rc</code>的值是<code>r</code>新增行， 如果<code>rc</code>的值为<code>c</code>则新增列， 例如<code>rc=r，index=4，len=5</code>，则代表从第4行开始增加5行，如果<code>data</code>为空则增加空行，如果<code>data</code>不为空则用<code>data</code>中的数组添加新增的行中。</p> <p>主要是对 <code>luckysheetfile[i].celldata</code> 中的单元格进行操作，以上述为例，首先 <code>luckysheetfile[i].row</code> 加5，然后把<code>r</code>大于4的单元格的整体的<code>r</code>值+5，如果<code>data</code>为空则增加空行则结束，如果<code>data</code>不为空则把二维数组<code>data</code>转换为 <code>{r:0,c:0,v:100}</code> 的格式并添加到<code>celldata</code>中，转换的伪代码如下：</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">var</span> ret <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token keyword">for</span><span class="token punctuation">(</span><span class="token keyword">var</span> r<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>r<span class="token operator">&lt;</span>data<span class="token punctuation">.</span>length<span class="token punctuation">;</span>r<span class="token operator">++</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token keyword">for</span><span class="token punctuation">(</span><span class="token keyword">var</span> c<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span>c<span class="token operator">&lt;</span>data<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>length<span class="token punctuation">;</span>c<span class="token operator">++</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span>d<span class="token punctuation">[</span>r<span class="token punctuation">]</span><span class="token punctuation">[</span>c<span class="token punctuation">]</span><span class="token operator">==</span><span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            <span class="token keyword">continue</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        ret<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span><span class="token punctuation">{</span>r<span class="token operator">:</span>r<span class="token operator">+</span><span class="token number">5</span><span class="token punctuation">,</span> c<span class="token operator">:</span>c<span class="token punctuation">,</span> v<span class="token operator">:</span> data<span class="token punctuation">[</span>r<span class="token punctuation">]</span><span class="token punctuation">[</span>c<span class="token punctuation">]</span><span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token keyword">return</span> ret<span class="token punctuation">;</span>
</code></pre></div></li></ul> <h2 id="筛选操作"><a href="#筛选操作" class="header-anchor">#</a> 筛选操作</h2> <h3 id="清除筛选"><a href="#清除筛选" class="header-anchor">#</a> 清除筛选</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;fsc&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>后台更新</strong>：</p> <p>清除 <code>luckysheetfile[0].filter = null</code> ， <code>luckysheetfile[i].filter_select = null</code>。</p></li></ul> <h3 id="恢复筛选"><a href="#恢复筛选" class="header-anchor">#</a> 恢复筛选</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;fsr&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;filter&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
      <span class="token property">&quot;filter_select&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>后台更新</strong>：</p> <p>清除 <code>luckysheetfile[i]. filter = v.filter</code>， <code>luckysheetfile[i]. filter_select = v. filter_select</code>。</p></li></ul> <h2 id="sheet操作"><a href="#sheet操作" class="header-anchor">#</a> sheet操作</h2> <h3 id="新建sheet"><a href="#新建sheet" class="header-anchor">#</a> 新建sheet</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;sha&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet11&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;color&quot;</span><span class="token operator">:</span> <span class="token string">&quot;&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;status&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;order&quot;</span><span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span>
      <span class="token property">&quot;index&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_oWlM5pKnwL1s_1598331858653&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;celldata&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
      <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token number">84</span><span class="token punctuation">,</span>
      <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token number">60</span><span class="token punctuation">,</span>
      <span class="token property">&quot;config&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token property">&quot;pivotTable&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
      <span class="token property">&quot;isPivotTable&quot;</span><span class="token operator">:</span> <span class="token boolean">false</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><tr><td colspan="2">参数</td> <td>说明</td></tr> <tr><td colspan="2">t</td> <td>操作类型表示符号</td></tr> <tr><td colspan="2">i</td> <td>当前sheet的index值</td></tr> <tr><td rowspan="11">v</td> <td>name</td> <td>隐藏后跳转的sheet的index值</td></tr> <tr><td>color</td> <td>Sheet颜色</td></tr> <tr><td>status</td> <td>激活状态</td></tr> <tr><td>order</td> <td>Sheet摆放顺序</td></tr> <tr><td>index</td> <td>Index索引</td></tr> <tr><td>celldata</td> <td>单元格数据集</td></tr> <tr><td>row</td> <td>行数</td></tr> <tr><td>column</td> <td>列数</td></tr> <tr><td>config</td> <td>设置</td></tr> <tr><td>pivotTable</td> <td>数据透视表设置</td></tr> <tr><td>isPivotTable</td> <td>是否数据透视表</td></tr></table></li> <li><p><strong>后台更新</strong>：</p> <p>添加一行（一个文档）到数据库中。
<code>luckysheetfile.push(json)</code></p></li></ul> <h3 id="复制sheet"><a href="#复制sheet" class="header-anchor">#</a> 复制sheet</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;shc&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_e5pKTeloilhe_1598332166630&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;copyindex&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
      <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Cell(Copy)&quot;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>后台更新</strong>：</p> <p>复制表格中的sheet索引值为<code>copyindex</code>并添加到数据库中，添加的设置该新文档的<code>index</code>为<code>i</code>对应的值。</p></li></ul> <h3 id="删除sheet"><a href="#删除sheet" class="header-anchor">#</a> 删除sheet</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;shd&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;deleIndex&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><tr><td colspan="2">参数</td> <td>说明</td></tr> <tr><td colspan="2">t</td> <td>操作类型表示符号</td></tr> <tr><td rowspan="2">v</td> <td>deleIndex</td> <td>需要删除的sheet索引</td></tr></table></li> <li><p><strong>后台更新</strong>：</p> <p>删除索引为<code>deleIndex</code>对应值的sheet。</p></li></ul> <h3 id="删除sheet后恢复操作"><a href="#删除sheet后恢复操作" class="header-anchor">#</a> 删除sheet后恢复操作</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;shre&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;reIndex&quot;</span><span class="token operator">:</span> <span class="token string">&quot;0&quot;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><tr><td colspan="2">参数</td> <td>说明</td></tr> <tr><td colspan="2">t</td> <td>操作类型表示符号</td></tr> <tr><td rowspan="2">v</td> <td>deleIndex</td> <td>需要恢复的sheet索引</td></tr></table></li> <li><p><strong>后台更新</strong>：</p> <p>恢复索引为<code>reIndex</code>对应值的sheet。</p></li></ul> <h3 id="调整sheet位置"><a href="#调整sheet位置" class="header-anchor">#</a> 调整sheet位置</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;shr&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;0&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
      <span class="token property">&quot;1&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
      <span class="token property">&quot;2&quot;</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
      <span class="token property">&quot;3&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
      <span class="token property">&quot;4&quot;</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
      <span class="token property">&quot;5&quot;</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
      <span class="token property">&quot;6&quot;</span><span class="token operator">:</span> <span class="token number">6</span><span class="token punctuation">,</span>
      <span class="token property">&quot;7&quot;</span><span class="token operator">:</span> <span class="token number">7</span><span class="token punctuation">,</span>
      <span class="token property">&quot;Sheet_6az6nei65t1i_1596209937084&quot;</span><span class="token operator">:</span> <span class="token number">8</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>v</td> <td>设置Sheet的排序，为一个键值对，<code>key</code>代表sheet的<code>index</code>，<code>value</code>代表<code>order</code>值。格式为：<code>{&quot;1&quot;: 3, &quot;2&quot;:1, &quot;0&quot;: 2, &quot;3&quot;:0}</code></td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>对sheet的<code>index</code>等于<code>key</code>的页，设置其<code>order</code>属性为<code>value</code>值。示例：</p> <p><code>luckysheetfile[key1].order = value1</code> <code>luckysheetfile[key2].order = value2</code> <code>luckysheetfile[key3].order = value3</code></p></li></ul> <h3 id="切换到指定sheet"><a href="#切换到指定sheet" class="header-anchor">#</a> 切换到指定sheet</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;shs&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>v</td> <td>要切换到的sheet页索引</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>对sheet的<code>index</code>等于<code>v</code>的页，设置其<code>status</code>属性为<code>1</code>值。示例：</p> <p><code>luckysheetfile[v].status = 1</code></p></li></ul> <h2 id="sheet属性-隐藏或显示"><a href="#sheet属性-隐藏或显示" class="header-anchor">#</a> sheet属性(隐藏或显示)</h2> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;sh&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
  <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
  <span class="token property">&quot;op&quot;</span><span class="token operator">:</span> <span class="token string">&quot;hide&quot;</span><span class="token punctuation">,</span>
  <span class="token property">&quot;cur&quot;</span><span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>

</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>op</td> <td>操作选项，有hide、show</td></tr> <tr><td>v</td> <td>如果<code>hide</code>为<code>1</code>则隐藏，为<code>0</code>或者空则为显示</td></tr> <tr><td>cur</td> <td>隐藏后设置索引对应<code>cur</code>的sheet为激活状态</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新<code>i</code>对应sheet的根路径<code>hide</code>字段为<code>v</code></p> <p>当隐藏时<code>status</code>值为<code>0</code>，更新<code>index</code>对应<code>cur</code>的sheet的<code>status</code>状态为<code>1</code></p> <p><code>luckysheetfile[0].hide = 1</code> <code>luckysheetfile[0].status = 0</code> <code>luckysheetfile[1].status = 1</code></p> <p>显示某个sheet页时，json为</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;sh&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">6</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span> <span class="token string">&quot;show&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>status</code>值为<code>1</code>，上一个激活sheet的<code>status</code>状态为<code>0</code></p> <p><code>luckysheetfile[6].hide = 0</code> <code>luckysheetfile[6].status = 1</code> <code>luckysheetfile[old_cur].status = 0</code></p></li></ul> <h2 id="表格信息更改"><a href="#表格信息更改" class="header-anchor">#</a> 表格信息更改</h2> <h3 id="修改工作簿名称"><a href="#修改工作簿名称" class="header-anchor">#</a> 修改工作簿名称</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;na&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Luckysheet Demo1&quot;</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>v</td> <td>工作簿名称</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>Luckysheet配置，修改title为<code>&quot;Luckysheet Demo1&quot;</code></p></li></ul> <h2 id="图表-todo"><a href="#图表-todo" class="header-anchor">#</a> 图表(TODO)</h2> <p>图表操作类型有4种，分别为新增图表&quot;add&quot;、移动图表位置&quot;xy&quot;、缩放图表&quot;wh&quot;、修改图表配置&quot;update&quot;</p> <h3 id="新增图表"><a href="#新增图表" class="header-anchor">#</a> 新增图表</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;c&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span><span class="token string">&quot;add&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;chart_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;chart_p145W6i73otw_1596209943446&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;width&quot;</span><span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
        <span class="token property">&quot;height&quot;</span><span class="token operator">:</span> <span class="token number">250</span><span class="token punctuation">,</span>
        <span class="token property">&quot;left&quot;</span><span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span>
        <span class="token property">&quot;top&quot;</span><span class="token operator">:</span> <span class="token number">120</span><span class="token punctuation">,</span>
        <span class="token property">&quot;sheetIndex&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_6az6nei65t1i_1596209937084&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;needRangeShow&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;chartOptions&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">&quot;chart_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;chart_p145W6i73otw_1596209943446&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;chartAllType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;echarts|line|default&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeArray&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">4</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">7</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeColCheck&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;exits&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeRowCheck&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;exits&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeConfigCheck&quot;</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            <span class="token property">&quot;defaultOption&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;title&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">&quot;show&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;text&quot;</span><span class="token operator">:</span> <span class="token string">&quot;默认标题&quot;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">&quot;isShow&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>op</td> <td>操作选项</td></tr> <tr><td>v</td> <td>图表的配置信息</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新对应sheet页中的图表设置，如果<code>luckysheetfile[i].chart</code>为null，则初始化为空数组 <code>[]</code></p> <div class="language-json extra-class"><pre class="language-json"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span>.chart.push(v)
</code></pre></div></li></ul> <h3 id="移动图表位置"><a href="#移动图表位置" class="header-anchor">#</a> 移动图表位置</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;c&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span><span class="token string">&quot;xy&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;chart_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;chart_p145W6i73otw_1596209943446&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;left&quot;</span><span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span>
        <span class="token property">&quot;top&quot;</span><span class="token operator">:</span> <span class="token number">120</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>op</td> <td>操作选项</td></tr> <tr><td>v</td> <td>图表的配置信息</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新对应sheet页中的图表设置</p> <div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span><span class="token punctuation">.</span>left <span class="token operator">=</span> v<span class="token punctuation">.</span>left<span class="token punctuation">;</span>
luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span><span class="token punctuation">.</span>top <span class="token operator">=</span> v<span class="token punctuation">.</span>top<span class="token punctuation">;</span>
</code></pre></div></li></ul> <h3 id="缩放图表"><a href="#缩放图表" class="header-anchor">#</a> 缩放图表</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;c&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span><span class="token string">&quot;wh&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;chart_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;chart_p145W6i73otw_1596209943446&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;width&quot;</span><span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
        <span class="token property">&quot;height&quot;</span><span class="token operator">:</span> <span class="token number">250</span><span class="token punctuation">,</span>
        <span class="token property">&quot;left&quot;</span><span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span>
        <span class="token property">&quot;top&quot;</span><span class="token operator">:</span> <span class="token number">120</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>op</td> <td>操作选项</td></tr> <tr><td>v</td> <td>图表的配置信息</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新对应sheet页中的图表设置</p> <div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span><span class="token punctuation">.</span>left <span class="token operator">=</span> v<span class="token punctuation">.</span>left<span class="token punctuation">;</span>
luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span><span class="token punctuation">.</span>top <span class="token operator">=</span> v<span class="token punctuation">.</span>top<span class="token punctuation">;</span>
luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span><span class="token punctuation">.</span>width <span class="token operator">=</span> v<span class="token punctuation">.</span>width<span class="token punctuation">;</span>
luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span><span class="token punctuation">.</span>height <span class="token operator">=</span> v<span class="token punctuation">.</span>height<span class="token punctuation">;</span>
</code></pre></div></li></ul> <h3 id="修改图表配置"><a href="#修改图表配置" class="header-anchor">#</a> 修改图表配置</h3> <ul><li><p><strong>格式</strong>：</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
    <span class="token property">&quot;t&quot;</span><span class="token operator">:</span> <span class="token string">&quot;c&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;i&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
    <span class="token property">&quot;op&quot;</span><span class="token operator">:</span><span class="token string">&quot;update&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;v&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;chart_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;chart_p145W6i73otw_1596209943446&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;width&quot;</span><span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
        <span class="token property">&quot;height&quot;</span><span class="token operator">:</span> <span class="token number">250</span><span class="token punctuation">,</span>
        <span class="token property">&quot;left&quot;</span><span class="token operator">:</span> <span class="token number">20</span><span class="token punctuation">,</span>
        <span class="token property">&quot;top&quot;</span><span class="token operator">:</span> <span class="token number">120</span><span class="token punctuation">,</span>
        <span class="token property">&quot;sheetIndex&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Sheet_6az6nei65t1i_1596209937084&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;needRangeShow&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;chartOptions&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
            <span class="token property">&quot;chart_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;chart_p145W6i73otw_1596209943446&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;chartAllType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;echarts|line|default&quot;</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeArray&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token property">&quot;row&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">4</span> <span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token property">&quot;column&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">7</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeColCheck&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;exits&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeRowCheck&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;exits&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token property">&quot;range&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
            <span class="token property">&quot;rangeConfigCheck&quot;</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            <span class="token property">&quot;defaultOption&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                <span class="token property">&quot;title&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
                    <span class="token property">&quot;show&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
                    <span class="token property">&quot;text&quot;</span><span class="token operator">:</span> <span class="token string">&quot;默认标题&quot;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token property">&quot;isShow&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div></li> <li><p><strong>说明</strong>：</p> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>t</td> <td>操作类型表示符号</td></tr> <tr><td>i</td> <td>当前sheet的index值</td></tr> <tr><td>op</td> <td>操作选项</td></tr> <tr><td>v</td> <td>图表的配置信息</td></tr></tbody></table></li> <li><p><strong>后台更新</strong>：</p> <p>更新对应sheet页中的图表设置</p> <div class="language-js extra-class"><pre class="language-js"><code>luckysheetfile<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>chart<span class="token punctuation">[</span>v<span class="token punctuation">.</span>chart_id<span class="token punctuation">]</span> <span class="token operator">=</span> v<span class="token punctuation">;</span>
</code></pre></div></li></ul> <h2 id="后端返回格式"><a href="#后端返回格式" class="header-anchor">#</a> 后端返回格式</h2> <p>websocket 后端返回的数据格式</p> <div class="language-js extra-class"><pre class="language-js"><code><span class="token punctuation">{</span>
    createTime<span class="token operator">:</span> 命令发送时间
    data<span class="token operator">:</span><span class="token punctuation">{</span><span class="token punctuation">}</span> 修改的命令
    id<span class="token operator">:</span> <span class="token string">&quot;7a&quot;</span>   websocket的id
    returnMessage<span class="token operator">:</span> <span class="token string">&quot;success&quot;</span>
    status<span class="token operator">:</span> <span class="token string">&quot;0&quot;</span>  <span class="token number">0</span>告诉前端需要根据data的命令修改  <span class="token number">1</span>无意义
    type<span class="token operator">:</span> <span class="token number">0</span>：连接成功，<span class="token number">1</span>：发送给当前连接的用户，<span class="token number">2</span>：发送信息给其他用户，<span class="token number">3</span>：发送选区位置信息，<span class="token number">999</span>：用户连接断开
    username<span class="token operator">:</span> 用户名
<span class="token punctuation">}</span>
</code></pre></div></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/mengshukeji/Luckysheet/edit/master/docs/zh/guide/operate.md" target="_blank" rel="noopener noreferrer">在 GitHub 上编辑此页</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">1/19/2021, 1:33:53 AM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/LuckysheetDocs/zh/guide/cell.html" class="prev">
        单元格
      </a></span> <span class="next"><a href="/LuckysheetDocs/zh/guide/api.html">
        API
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/LuckysheetDocs/assets/js/app.02d9598d.js" defer></script><script src="/LuckysheetDocs/assets/js/2.daa13025.js" defer></script><script src="/LuckysheetDocs/assets/js/31.d87cf3af.js" defer></script>
  </body>
</html>
